import 'package:dometwo/conputes/statefulComp.dart';
import 'package:dometwo/conputes/statelessComp.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(const MaterialApp(home: myApp()));
}

//无状态
class myApp extends StatelessWidget {
  const myApp({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Colors.yellow,
        centerTitle: true,
        title: const Text(
          '我的歌单',
          style: TextStyle(
            color: Colors.white,
            fontSize: 25,
          ),
        ),
      ),
      body: const Center(
          child: Column(
        children: [
          statelessComp(username: '我的名字'),
          statefulcomp(usernames: '找自己')
        ],
      )),
    );
  }
}
